package com.yanq.liancar.adapter;
/*
 *  @创建者     Administrator
 *  @创建时间   2018/12/7  17:35
 *  @描述       ${TODO}
 */


import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yanq.liancar.R;
import com.yanq.liancar.bean.CarCheckDataBean;

import java.util.List;

public class CarDoctorAdapter extends BaseQuickAdapter<CarCheckDataBean.DataBean.CheckDataBean, BaseViewHolder> {
    public CarDoctorAdapter(int layoutResId, @Nullable List<CarCheckDataBean.DataBean.CheckDataBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, CarCheckDataBean.DataBean.CheckDataBean item) {
        helper.setText(R.id.tv_name,item.getCheckName());
        ImageView imageView=helper.getView(R.id.img_type);
        if (item.getStatus()==1){
            imageView.setImageResource(R.mipmap.ok);
        }else {
            imageView.setImageResource(R.mipmap.chahao_red);
        }
    }
}
